package com.xiaobaibai.units;

import com.alibaba.fastjson.JSONObject;
import com.xiaobaibai.bo.pay.WxPayCreateOrder;
import com.xiaobaibai.units.pay.HttpClientUnit;

public class PayHttpUnit {

    private static final String url="https://api.mch.weixin.qq.com/v3/pay/transactions/jsapi";

    public static String createWxPayOrder(WxPayCreateOrder wxPayCreateOrder){

        JSONObject jsonObject = HttpClientUnit.wxPayPost(url, wxPayCreateOrder);

        return jsonObject.get("prepay_id").toString();
    }

}
